<div class="xlj-edit-addr-backdrop" id="AddrBackdrop" ></div>
<div class="xlj-edit-addr-box" id="editAddrBox">
    <form action="/index.php?C=Member&F=path" method="post" name="theFormAddress" onsubmit="return checkConsignee(this)">
        <div class="bd">
            <div class="item">
                <label>收货人姓名</label><input type="text" name="name" id="Consignee" class="input" placeholder="<?php echo $arr['name'];?>" maxlength="15" autocomplete="off" value="">
            </div>
            <div class="item">
                <label>联系电话</label><input type="text" name="phone" class="input" id="Telephone" placeholder="<?php echo $arr['phone'];?>" autocomplete="off" value="">
            </div>
            <div class="item">
                <select id="selProvinces_0" onchange="region.changed(this, 2, 'selCities_0')" class="select-address">
                    <option value="0"><?php echo $arr['sheng'];?></option>
                    <option value="2" >北京</option>
                    <option value="3" >安徽</option>
                    <option value="4" >福建</option>
                    <option value="5" >甘肃</option>
                    <option value="6" >广东</option>
                    <option value="7" >广西壮族自治区</option>
                    <option value="8" >贵州省</option>
                    <option value="9" >海南</option>
                    <option value="10" >河北省</option>
                    <option value="11" >河南</option>
                    <option value="12" >黑龙江</option>
                    <option value="13" >湖北</option>
                    <option value="14" >湖南省</option>
                    <option value="15" >吉林省</option>
                    <option value="16" >江苏省</option>
                    <option value="17" >江西省</option>
                    <option value="19" >内蒙古</option>
                    <option value="20" >宁夏回族自治区</option>
                    <option value="21" >青海</option>
                    <option value="22" >山东</option>
                    <option value="23" >山西省</option>
                    <option value="24" >陕西省</option>
                    <option value="25" >上海</option>
                    <option value="26" >四川省</option>
                    <option value="27" >天津</option>
                    <option value="28" >西藏自治区</option>
                    <option value="29" >新疆</option>
                    <option value="30" >云南省</option>
                    <option value="31" >浙江</option>
                    <option value="32" >重庆</option>
                    <option value="33" >香港特别行政区</option>
                    <option value="34" >澳门特别行政区</option>
                    <option value="35" >台湾省</option>
                    <option value="4347" >辽宁</option>
                </select>
                <select  id="selCities_0" onchange="region.changed(this, 3, 'selDistricts_0')" class="select-address">
                    <option value="0"><?php echo $arr['shi'];?></option>
                </select>
                <select  id="selDistricts_0" style="display:none" class="select-address">
                    <option value="0"><?php echo $arr['qu'];?></option>
                </select>

                <input type="hidden" name="sheng" id="sheng">
                <input type="hidden" name="shi" id="shi">
                <input type="hidden" name="qu" id="qu">
            </div>
            <div class="item">
                <label>路名或街道地址，门牌号</label>
                <textarea name="txt" class="input-area" id="Street" placeholder="<?php echo $arr['txt'];?>"></textarea>
            </div>
            <div class="item">
                <label>邮政编码</label><input type="text" name="ycode" id="Zipcode" class="input zipcode" placeholder="<?php echo $arr['ycode'];?>" autocomplete="off" value="">
            </div>
            <input type="hidden" name="id" value="<?php echo $_GET['id']?>">
            <div class="item ft">
                <input type="hidden" name="act" value="act_edit_address" />
                <input type="hidden" name="myact" value="user" />
                <input name="address_id" type="hidden" value="" />
                <input type="submit" class="btn  btn-primary btn-ok" id="addOk" value="确认收货地址" />
                <input type="button" class="btn   btn-back " id="addBack" value="取消" />
            </div>
        </div>
    </form>
</div>

<script type="text/javascript">

    $(function(){
        $('#addOk').bind('click',function(){
            //获取下拉框选中的文本
            $('#sheng').val($('#selProvinces_0').find("option:selected").text());
            $('#shi').val($('#selCities_0').find("option:selected").text());
            $('#qu').val($('#selDistricts_0').find("option:selected").text());
        });
    })

    function isPlaceholer() {

        var input = document.createElement('input');
        return "placeholder" in input;
    }

    if (!isPlaceholer()) {
        var  minput=$('input[type="text"][placeholder],textarea');

        var  mlabel= minput.prev("label");
        if(minput.val()!=""){
            mlabel.hide();
        }else{
            mlabel.show();
        }

        minput.off("focus").on("focus",function(){

            $(this).prev("label").hide();
        }).off("blur").on("blur",function(){
            if($(this).val()==""){
                $(this).prev("label").show();
            }
        }),
                mlabel.off().on("click",function(){
                    $(this).next().focus();
                })

    }


</script>
